package com.fq.myapplication.bean;

public class SettingItem {

    public static final int TYPE_GROUP_TITLE = 0;
    public static final int TYPE_NORMAL = 1;
    public static final int TYPE_SWITCH = 2;
    public static final int TYPE_BUTTON = 3;

    private final int type;
    private final String title;
    private final Integer iconRes;
    private final String desc;
    private boolean checked;

    public SettingItem(int type, String title, Integer iconRes, String desc, boolean checked) {
        this.type = type;
        this.title = title;
        this.iconRes = iconRes;
        this.desc = desc;
        this.checked = checked;
    }

    public int getType() {
        return type;
    }

    public String getTitle() {
        return title;
    }

    public Integer getIconRes() {
        return iconRes != null ? iconRes : android.R.color.transparent;
    }

    public String getDesc() {
        return desc;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }
}
